Component({
  mixins: [],
  data: {
    value: ''
  },
  props: {
    onSearch: () => {}
  },
  didMount() {},
  didUpdate() {},
  didUnmount() {},
  methods: {
    handleSearch() {
      my.hideKeyboard()
      const {
        value
      } = this.data
      const searchVal = value.trim() ? value : null
      this.props.onSearch(searchVal);
    },
    onChange(e) {
      this.setData({
        value: e
      })
    }
  },
});